﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Card.Web.Member
{
    public partial class OrderCard : MemberBase
    {
        #region
        private int CardID
        {
            get
            {
                int cardID = 0;
                if (!string.IsNullOrEmpty(Request.QueryString["cid"]))
                {
                    int.TryParse(Request.QueryString["cid"], out cardID);
                }
                return cardID;
            }
        }

        private Entity.OrderCard m_Card = null;

        public Entity.OrderCard NameCard
        {
            get { return m_Card; }
            set { m_Card = value; }
        }
        #endregion

        #region
        protected void Page_Load(object sender, EventArgs e)
        {
            this.DoInit();
        }
        #endregion

        #region
        private void DoInit()
        {
            m_Card = BLL.OrderCardManager.GetEntity(CardID, this.Passport);
            if (m_Card != null && this.Passport.UserID == m_Card.UserID)
            {

            }
            else
            {
                Response.Redirect("/");
            }
        }
        #endregion
    }
}
